tenant:
  name: myminio
  image:
    repository: easzlab.io.local:5000/minio/minio
  configSecret:
    name: myminio-env-configuration
    existingSecret: true

  # https://min.io/docs/minio/kubernetes/upstream/reference/operator-crd.html#pool
  pools:
    # For standalone mode, supply 1. For distributed mode, supply 4 or more.
    - servers: {{ minio_pool_servers }}
      name: pool-0
      volumesPerServer: 1
      size: {{ minio_pool_size }}
      storageClassName: "{{ minio_storage_class }}"
      resources:
        requests:
          cpu: 500m
          memory: 500Mi
        limits:
          cpu: 2000m
          memory: 4000Mi
  
  # Configures a Prometheus-compatible scraping endpoint at the specified port.
  metrics:
    enabled: false
    port: 9000
    protocol: http
  
  # Configures external certificate settings for the Tenant.
  certificate:
{% if minio_tls_enabled|bool %}
    requestAutoCert: true
{% if minio_with_global_cert|bool %}
    externalCertSecret:
      - name: minio-global-cert
{% endif %}
{% else %}
    requestAutoCert: false
    externalCertSecret: [ ]
{% endif %}
  
  # https://min.io/docs/minio/kubernetes/upstream/reference/operator-crd.html#features
  features:
    bucketDNS: false
    domains: { }
    enableSFTP: false

  buckets:
    - name: test-bucket
      objectLock: false
  ###
  # Array of Kubernetes secrets from which the Operator generates MinIO users during tenant provisioning.
  #
  # Each secret should specify the ``CONSOLE_ACCESS_KEY`` and ``CONSOLE_SECRET_KEY`` as the access key and secret key for that user.
  users: [ ]

  liveness:
    httpGet:
      path: /minio/health/live
      port: 9000
      scheme: {% if minio_tls_enabled|bool %}HTTPS{% else %}HTTP{% endif %} 
    initialDelaySeconds: 30
    periodSeconds: 30
    timeoutSeconds: 10
    successThreshold: 1
    failureThreshold: 3

  readiness:
    httpGet:
      path: /minio/health/ready
      port: 9000
      scheme: {% if minio_tls_enabled|bool %}HTTPS{% else %}HTTP{% endif %} 
    initialDelaySeconds: 30
    periodSeconds: 15
    timeoutSeconds: 10
    successThreshold: 1
    failureThreshold: 3

  ###
  podManagementPolicy: Parallel
  exposeServices:
    minio: true
    console: true 
  ###
  # Directs the Operator to add the Tenant's metric scrape configuration to an existing Kubernetes Prometheus deployment managed by the Prometheus Operator.
  prometheusOperator: false

extraResources:
  - |
    apiVersion: v1
    kind: Secret
    type: Opaque
    metadata:
      name: myminio-env-configuration
      namespace: {{ minio_namespace }}
    stringData:
      config.env: |-
        export MINIO_ROOT_USER={{ minio_root_user }}
        export MINIO_ROOT_PASSWORD={{ minio_root_password }}
        export MINIO_PROMETHEUS_URL=http://prometheus-kube-prometheus-prometheus.{{ prom_namespace }}.svc:9090
        export MINIO_PROMETHEUS_AUTH_TYPE=public
